package pers.cz.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * @program: PostGirl-panent
 * @description: RedisProperties
 * @author: Cheng Zhi
 * @create: 2021-07-26 20:25
 **/
@Component

public class RedisProperties {

    // ip
    private String host;

    private Integer port;

    private String password;

    // 最大激活连接数
    private Long maxActive;

    // 最大连接等待时间
    private Long maxWait;

    // 最大连接等待中的数量
    private Integer maxIdle;

    private Integer minIdle;

    // 超时时间
    private Integer timeout;

    // 连接耗尽时是否阻塞, false报异常,ture阻塞直到超时
    private Boolean blockWhenExhausted;

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Long getMaxActive() {
        return maxActive;
    }

    public void setMaxActive(Long maxActive) {
        this.maxActive = maxActive;
    }

    public Long getMaxWait() {
        return maxWait;
    }

    public void setMaxWait(Long maxWait) {
        this.maxWait = maxWait;
    }

    public Integer getMaxIdle() {
        return maxIdle;
    }

    public void setMaxIdle(Integer maxIdle) {
        this.maxIdle = maxIdle;
    }

    public Integer getMinIdle() {
        return minIdle;
    }

    public void setMinIdle(Integer minIdle) {
        this.minIdle = minIdle;
    }

    public Integer getTimeout() {
        return timeout;
    }

    public void setTimeout(Integer timeout) {
        this.timeout = timeout;
    }

    public Boolean getBlockWhenExhausted() {
        return blockWhenExhausted;
    }

    public void setBlockWhenExhausted(Boolean blockWhenExhausted) {
        this.blockWhenExhausted = blockWhenExhausted;
    }
}
